package cn.antho.superhelp.feign;

import cn.antho.superhelp.fallback.StaffServiceFallbackFactory;
import cn.antho.superhelp.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(
        contextId = "staffService",
        value = "service-staff",
        fallbackFactory = StaffServiceFallbackFactory.class,
        path = "/staff"
)
public interface StaffService {

    @RequestMapping(value = "/{id}",method = RequestMethod.GET)
    JsonResult selectOne(@PathVariable("id")Long id);

}
